/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufpr.tads.ghtads.controller;

import br.ufpr.tads.ghtads.model.MateriaDao;
import br.ufpr.tads.ghtads.model.MateriaDto;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;

/**
 *
 * @author julio
 */
public class Materia {
    
    public void addMateria(MateriaDto materia) throws IOException, ClassNotFoundException, FileNotFoundException, SQLException{
        MateriaDao mat = new MateriaDao();
        mat.addMateria(materia);
        
    }
    public List<MateriaDto> listMateria() throws IOException, FileNotFoundException, ClassNotFoundException, SQLException{
        MateriaDao mat = new MateriaDao();

        return mat.listMateria();
    }
    public void delMateria(int id) throws IOException, FileNotFoundException, ClassNotFoundException, SQLException{
         MateriaDao mat = new MateriaDao();
         mat.delMateria(id);
    }
    
}
